﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using HP.Cachalote.Services;
using HP.Cachalote.Services.Interfaces;
using HP.Cachalote.DataModels;

namespace HP.Cachalote.WPF.Design
{
    public class DesignTodoItemService : ITodoItemService
    {
        public object Add(TodoItem entity)
        {
            throw new NotImplementedException();
        }

        public TodoItem Get(object id)
        {
            throw new NotImplementedException();
        }

        public IList<TodoItem> Filter(Expression<Func<TodoItem, bool>> expression)
        {
            return GetAll();
        }

        public IList<TodoItem> GetAll()
        {
            var result = new List<TodoItem>();

            result.Add(new TodoItem
                {
                    ID = 1,
                    Title = "My First Todo Item",
                    IsDone = false,
                    Label = new TodoLabel { ID = 1 }
                });

            result.Add(new TodoItem
            {
                ID = 2,
                Title = "My second Todo Item",
                IsDone = false,
                Label = new TodoLabel { ID = 1 }
            });

            result.Add(new TodoItem
            {
                ID = 2,
                Title = "My family Todo Item",
                IsDone = false,
                Label = new TodoLabel { ID = 2 }
            });

            return result;
        }

        public int GetRowCount(Expression<Func<TodoItem, bool>> expression)
        {
            throw new NotImplementedException();
        }

        public void Update(TodoItem entity)
        {
            throw new NotImplementedException();
        }

        public void AddOrUpdate(TodoItem entity)
        {
            throw new NotImplementedException();
        }

        public void Delete(TodoItem entity)
        {
            throw new NotImplementedException();
        }

        public TodoItem Get(object id, bool loadTodoLabel)
        {
            throw new NotImplementedException();
        }

        public IList<TodoItem> Filter(Expression<Func<TodoItem, bool>> expression, bool loadTodoLabel)
        {
            throw new NotImplementedException();
        }
    }
}
